<div class="widgets">
    <div ng-sortable="sortableConfig" class="widgets_col" ng-repeat="col in widgets track by $index">
        <div ng-repeat="widget in col" class="b-island widget">
            <div>
                <div class="widget_handle pull-right">
                    <span class="fa fa-lg fa-arrows"></span>
                </div>
                <h3 class="widget_title">{{widget.name}}</h3>
            </div>
            <div ng-switch on="widget.type">
                <widget-statistics ng-switch-when="TITLE_STATISTICS" data="widget.data"></widget-statistics>
                <widget-messages ng-switch-when="DEFECTS" data="widget.data"></widget-messages>
                <widget-key-value ng-switch-when="KEY_VALUE" data="widget.data"></widget-key-value>
                <widget-total ng-switch-when="TOTAL" data="{'statistic': widget.statistic, 'time': widget.time}"></widget-total>
                <div ng-switch-default>Type "{{widget.type}}" not supported for widgets.</div>
            </div>
        </div>
    </div>
</div>
